import request from "@/utils/request";
//获取订单列表
export function getOrders(per = 10, page = 1) {
  return request({
    url: "/api/v1/admin/orders",
    method: "get",
    params: {
      per,
      page,
    },
  });
}

//获取单个订单
export function getPerOrder(id) {
  return request({
    url: "/api/v1/admin/orders/" + id,
    method: "get",
  });
}

//修改订单信息
export function xiugaiOrder(id, data) {
  return request({
    url: "/api/v1/admin/orders/" + id,
    method: "put",
    data,
  });
}

//关闭订单
export function deleteOrder(id) {
  return request({
    url: "/api/v1/admin/orders/" + id,
    method: "delete",
  });
}
